NOAHユーザー会(#4)「NOAHセルフ上で稼働する次世代PaaSについて」2011/12/15

1,119 views

Published on

本スライドの全てまたは部分的な引用はご遠慮ください。

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,119
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

NOAHユーザー会(#4)「NOAHセルフ上で稼働する次世代PaaSについて」2011/12/15

  1. 1. DripcastServer-less programming framework for ANDROID   Ikuo Nakagawa Dripcast Project Dec., 2011  
  2. 2. Changes of computer models   between concentration and distribution, local and in-house toward global and scalable, we focus in cloud-full computing model, data store and data process on a cloud, and server-less programming model, e.g., transparent method call without thought of servers biz. trend is here.  Computing model   Host computer client and server   PC + Web   smartphone + cloud   device + cloud   global   distribute   local   concentrate  # of devices and processing nodes   10 : 1   1K : 10   1M : 100   1B : 10K   1T : 1M  Programming model   tech. trend touches here.   Host   3 layer model (client-server-database)   server-less  Dec., 2011   © Dripcast Project   2  
  3. 3. Our computing model, is...   Today, device + cloud communication style is ready for new applications. Computing model is "cloud-full" and Programming model is "server-less". Cloud platform technologies change the concept of "network" application. Todays topic   server-less programming model   computer resources on a cloud with unlimited data space unlimited processing space cloud-full computing model  Dec., 2011   © Dripcast Project   3  
  4. 4. Server-less programming   "Bibbidi-Bobbidi-Boo" (also called "The Magic Song") is a novelty song, written in 1948 by Al Hoffman, Mack David, and Jerry Livingston. It was introduced in the 1950 Disney film Cinderella, performed by actress Verna Felton.  Dec., 2011   © Dripcast Project   4  
  5. 5. Bibbidi-Bobbidi-Boo   write your code defining via interface. "how to access" its Java ! Try, 3 minutes hacking...   your data object.   // an instance we want to handle. interface Gadget { Gadget a = new GadgetImpl(); void setValue(int val); int getValue(); } // store out value to the object, at first. a.setValue(31); class GadgetImpl implements Gadget { private int value = 0; // now, verify input against our value. public void setValue(int val) { String s = in.readLine(); value = val; if (Integer.parseInt(s) == a.getValue()) { } System.out.println("Great! Lucky guess!"); public int getValue() { } else { return value; System.out.println("No match. Sorry."); } } } defining "what to do" when you call it. Lets make an object to be cloud-enabled.Dec., 2011   © Dripcast Project   5  
  6. 6. Bibbidi-Bobbidi-Boo   write your code defining via interface. "how to access" its Java ! Try, 3 minutes hacking...   your data object.  // an instance we want to handle. interface Gadget {Gadget a = new GadgetImpl(); creating your void setValue(int val); data object int getValue();// Biddidi-Bobbidi-Boo. on a cloud.   }a = B3.setAndAttachInstance( key, Gadget.class, a);   executing your// store out value to the object, at first.a.setValue(31); method (request) class GadgetImpl implements Gadget { on a cloud, as well.   private int value = 0;// now, verify input against our value. public void setValue(int val) {String s = in.readLine(); value = val;if (Integer.parseInt(s) == a.getValue()) { } System.out.println("Great! Lucky guess!"); public int getValue() {} else { return value; System.out.println("No match. Sorry."); }} } defining "what to do" when you call it. your Android device data object   Cloud (application)   (platform)   What you need to do, is only casting a spell "Bibbidi-Babbidi-Boo" !  Dec., 2011   © Dripcast Project   6  
  7. 7. ChangesSo, whats happen in Android application world ?  
  8. 8. Example of "sharing GPS location" application   It takes only 3 minutes to implement an application to share GPS info via the cloud. You only need to define class to hold location information (in Java), and share an instance. No SQL/table definition nor REST/HTTP implementation would be required. public class YourActivity implements Activity, LocationListener { UUID key = UUID.fromString("your-group-UUID"); // to share an object between group members. NavigableMap map; // will be associated with a cloud object, e.g., cloud-enabled. String id; // to store my phone number. public void onCreate() { map = B3.createOrAttachInstance(key, NavigableMap.class, "java.util.TreeMap"); id = ((TelephonyManager)getSystemService(TELEPHONY_SERVICE)).getLine1Number(); unique object ((LocationManager)getSystemService(LOCATION_SERVICE)).requestLocationUpdates( on a cloud   LocationManager.GPS_PROVIDER, 0, 0, this); } public void onLocationChanged(Location location) { GPS info   your-group-UUID int x = (int)(location.getLatitude() * 1E6); int y = (int)(location.getLongitue() * 1E6) map.put (id, x + "," + y); store your GPS info   // show, your members positions.... Entry entry = map.firstEntry (); while (entry != null) { our models are ; // show id and location : entry.getValue() getting GPS info } entry = map.higherEntry (entry.getKey()); of your party members cloud-full computing } and } server-less programming  Dec., 2011   © Dripcast Project   8  
  9. 9. Server-less programming – forget about server side   There is NO need to develop server side processing nor database programming. Our "Spell" delivers Java object into the cloud, both of for storing and processing. You need only to develop application logic. Its very simple and efficient. client-server server-RDB GUI / Design   communication communication server side tables Existing (Servlet) (RDB)  Develop. model Application logic   Write as easy as local. processing and storing NO skill is required for on the cloud, SQL/database nor even REST/HTTP.   automatically. GUI / Design   Cloud style Application logic  Develop. model Cloud Platform Application logic   Its 10 times easier to develop an application. Focus on application logic. Thats all. Dec., 2011   © Dripcast Project   9  
  10. 10. No more servers nor back-end systems for developers   Of course, there is no need to use SQL/RDB, Servlet nor REST/HTTP. that means, we dont have to learn more about,... Oracle, MySQL, PostgreSQL, Ruby, python, php, apache or others. No more server side technologies  Dec., 2011   © Dripcast Project   10  
  11. 11. Feel itSee, more examples...  
  12. 12. Write your own classes #1 - Mailbox   usage example interface definition // CREATE a mail box. public interface Mailbox { d.newInstance(mboxId, MailboxImpl.class); int size(); String get(int index); // POST a message. void post(String msg); Mailbox mb = d.attachInstance(mboxId, Mailbox.class); } mb.post("hello world!"); // LIST messages. implementation class Mailbox mb = d.attachInstance(mboxId, Mailbox.class); int total = mb.size(); public class MailboxImpl implements Mailbox { System.out.println("total " + total + " messages in mail box."); private Map<Integer,String> mails = new TreeMap<Integer,String>(); for (int i = 0; i < total; i++) { private int tail = 0; System.out.println("No." + i + ": " + mb.get(i); public int size() { } return tail; } public String get(int index) { if (index < 0 || index >= tail) throw new IllegalArgumentException(); return mails.get(index); } public void post(String msg) { mails.put(tail, msg); tail++; } } Write your codes, as easy as local, with server-less style.Dec., 2011   © Dripcast Project   12  
  13. 13. Write your own classes #1 - Mailbox   usage example interface definition // SEARCH messages for a given keyword. public interface SearchableMailbox extends Mailbox { SearchableMailbox mb = d.attachInstance(id, SearchableMailbox.class); List<Integer> search(String keyword) throws IOException; List<Integer> list = mb.search("Japan"); } System.out.println("total " + list.size() + " messages found."); for (int i : list) { System.out.println("No." + i + ": " + mb.get(i); implementation class } public class SearchableMailboxImpl extends MailboxImpl implements SearchableMailbox { public List<Integer> search(String keyword) throws IOException { execute your request int total = size(); on the cloud List<Integer> ret = new LinkedList<Integer>(); for (i = 0; i < total; i++) { if (get(i).indexOf(keyword) >= 0) { list.add(i); } } return list; } } use huge amount of computer resources, for your process !Dec., 2011   © Dripcast Project   13  
  14. 14. Inside Dripcastbasic architecture of Dripcast mechanism  
  15. 15. Configuration of the cloud #1   In a typical configuration, Smartphone works with Dripcast client, and a cloud have Dripcast engine with scale-out style storage, EXAGE / Storage by Intec. both of processing space and storage space are scalable. Smartphone Process space Storage space Dripcast cloud   Dripcast client   Dripcast engine   EXAGE / Storage   Very simple application Engine of the framework, Scale-out style storage framework for provides interfaces for (by Intec, Inc.) ANDROID/Java. storing and processing data. provides unlimited scalable its server-less programming   its Platform (aka PaaS)   storage space.  Dec., 2011   © Dripcast Project   15  
  16. 16. Configuration of the cloud #2   In a typical configuration, Smartphone works with Dripcast client, and a cloud have Dripcast engine with scale-out style NoSQL, Cassandra, both of processing space and storage space are scalable. Smartphone Process space Storage space Dripcast cloud   Cassandra is available as back-end store Dripcast client   Dripcast engine   Very simple application Engine of the framework, Scale-out style NoSQL framework for provides interfaces for (open source software) ANDROID/Java. storing and processing data. provides unlimited scalable its server-less programming   its Platform (aka PaaS)   data space.  Dec., 2011   © Dripcast Project   16  
  17. 17. F.Y.I. Configuration on the NOAH cloud   We have 4 relay servers and 16 engines on the NOAH cloud for multi-tenant services. Its easy to configure and setup Dripcast systems on the NOAH cloud. Just start a new server with Dripcast template. application distribution application features + auth. storage & processing parallel & distributed processing We appreciate to for our cloud style computer resources on If youd like to have your account on the Dripcast cloud, please contact to the Dripcast project.Dec., 2011   © Dripcast Project   17  
  18. 18. Service sites for Dripcast   Dripcast may have lots of services in its architecture, based on "service name". A client simply selects "service name" when it initializes the Dripcast. Services may have completely separated operational domains and hardwares. Dripcast.openConnection("noahcloud");   NOAHCLOUD   your own Dripcast.openConnection("your-cloud");   Dripcast cloud default site   If youd like to have your own Dripcast cloud, please contact to the Dripcast project.Dec., 2011   © Dripcast Project   18  
  19. 19. Activity Research project startedin academic + industrial organizations  
  20. 20. F.Y.I. - Research project started for Dripcast   Research project for server-less programming model   "live on cloud, play on device" Our goal is :   1. Research a new development style of "device + cloud". optimize data model & processing model of direct access to cloud objects. 2. Deploy and standardize very easy and simple development model. For several languages and environments. "dripcast" is one of such impl. for Java. 3. Evaluate and feedback of new style cloud platform service. Application (providers, developers) and Platform (network, IDC, cloud operators). Thanks for participating our project. Demonstration site available, soon. Smart Technologies, A.T.Works, Visit http://dripcast.org NOAH Cloud (IDCF), for more details. and many organizations will join us !Dec., 2011   © Dripcast Project   20  
  21. 21. Demonstration site is available To feel "server-less" programming, visit http://dripcast.org download and put the SDK (dripcast-lib-x.y.z.jar) into you CLASSPATH try your sample code, with Bibbidi-Bobbidi-Boo.Dec., 2011   © Dripcast Project   21  
  22. 22. FinPlease contact to Ikuo Nakagawa, for more information. Thank you.  

×