The example is a set of applications (IDE, headless, 3x RCP, Servlet) used to support the business of the electronic restaurant "eDine", where they have touch computers at all the tables and at the bar and in the kitchen. Special RCP applications operate on a distributed shared EMF model which is provided by a headless CDO repository server.
Running the Example
1) Install the example
- Checkout the "org.gastro.*" plugins via Team Project Set
2) Start the server process
- Start the "GastroServer" launch config. It creates a Derby database at "/gastro".
- Watch the console output.
3) Populate the repository
- Start the "GastroTestClient1" launch config. It opens a runtime IDE with generic CDO support.
- Open the "CDO Sessions" view.
- Add a new session (green plus button). Enter "tcp://localhost" and "gastro".
- Open a new transaction (right-click on the session).
- Import the /org.gastro.testclient/inventory.xml resource into "/eDine/inventory".
- Commit the transaction (right-click on the transaction or just save the editor).
4) Start the RCP application for table 1 (and optionally for table 2)
- Start the "GastroTable1" launch config. It opens an RCP application.
- Browse through the menu card and select some offerings here and there.
5) Start the RCP application for the bar
- Start the "GastroDepartment1" launch config. It opens an RCP application for the barkeeper.
- Watch orders coming in.
- Eventually click on order details to mark them SERVED and watch the order disappearing when completed.
6) Start the RCP application for the kitchen
- Start the "GastroDepartment2" launch config. It opens an RCP application for the cook.
- Eventually click on order details to mark them SERVED and watch the order disappearing when completed.
7) Send an order (if the RCP applications are all started, see steps 4-6)
- In the table application open the second shelf pane and send the order.
- Watch how the relevant order details "arrive" in the bar and kitchen applications...
8) Browse the menu card via Web
- Start a web browser and point it to "http://localhost:9090/gastro"
Enjoy your meal! ;-)
Cool stuff :)
ReplyDeleteBut shame on you that the web interface is not based on RAP ;-)
Thx Ben!
ReplyDeleteIf you want to contribute RAP support to the demo I'd appreciate to make it available with the other plugins!! ;-)
That is funny! On the plane I just read the first part of your article in Eclipse Magazin. I really like it. In fact, after reading the article I am thinking about using CDO for the application I am working on right now...
ReplyDeleteContinue the great work!
Michael
Michael,
ReplyDeleteThank you, good to know that all the effort is not for the bin :P
And hopefully the article and the example app make some of the benefits of modeling clear as well:
If you look into the code you'll notice that the whole system is mainly generated with EMF's default templates or "painted" with SWT Designer. The presentation logic is coded in a few lines against the business model or standard EMF APIs.
Excellent work Eike!!
ReplyDeleteOne of the most interesting works I've ever seen around. We certainly will adopt the CDO architecture and this approach in our projects.
A note: we prefer the RCP interface
Hallo Eike,
ReplyDeleteI have a problem with your example. If I click send order I have an exception like this:
org.eclipse.net4j.util.transaction.TransactionException: Rollback in DBStore: org.eclipse.net4j.util.ImplementationError
at org.eclipse.emf.cdo.common.id.CDOIDUtil.getLong(CDOIDUtil.java:84)
I'm newbie at CDO! Do you have an idea?
Stefan
Stefan,
ReplyDeleteAccording to your stack trace the CDO version you're working with is not the latest one. In HEAD there's an IllegalArgumentException telling about llegal use of external references. Can you check again with the HEAD version of CDO and report the complete stack trace via Bugzilla or the EMF newsgroup?
Cheers
/Eike
Hallo Eike,
ReplyDeletethanks for the fast solution.
Hi Eike,
ReplyDeleteI receive an error similar to that of Stefan, but not the same:
ReceiveSerializer-Channel[1, CLIENT] [debug.signal] Received buffer for correlation -36
[ERROR] Rollback in DBStore: java.lang.IllegalArgumentException: DBStore does not support external references: oidcdo://gastro/eDine/inventory#1/41
at org.eclipse.emf.cdo.server.db.CDODBUtil.getLong(CDODBUtil.java:140)
it seems that I have the latest CDO, at least I see the IllegalArgumentException you mentioned, what then can be wrong?
Vincenzo,
ReplyDeleteI tend to think that we broke something with one of the most recent changes. Can you file a bugzilla with the logs attached?
Cheers
/Eike
Excellent, absolutely excellent. I love modelling and you have made really strong additions to the community.
ReplyDeleteEike,
ReplyDeletesorry, it was my fault. Now I have checked out all projects about CDO and eDine it's working perfectly!
Thx N. ;-)
ReplyDeleteVincenzo, No worries: Getting it up and running for the first time is often hard. Btw. Wasn't it you being interested in translating CDO to Italian? Vik just registered CDO and Net4j with the Babel translation server...
Eike,
ReplyDeleteon Babel I selected:
Language=Italian
Project=modeling.emf (didn't find CDO nor Net4j)
Version=2.5.0
Files= ? (hoped to find CDO or Net4j here, but nothing)
What I am doing wrong?
Another thing: it's ok for us to translate language packs files, but we would be much more interested (if it can help) into translating tutorials and documentation.
Here we usually see people using the IDE and tools in English, while tutorials and documentation are usually asked in italian.
Vincenzo,
ReplyDeleteThe upcoming CDO version is 2.0 ;-)
Translating the documentation is interesting,too! But I've just begun to fill the manual. As you can see with the "Expand All" button there's lots of work left. The web manual is generated out of DITA sources stored in CVS. I've yet not thought about how to make this multi-lingual...
Cheers
/Eike
Eike, where has the project set moved? The URL in your blog has become invalid.
ReplyDelete/\/ikolaj
found it -- no googling available, but some browsing in CVS did it:
ReplyDeletehttp://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/deprecated/develop/setup/psf/pserver/cdo-gastro-example.psf?root=Modeling_Project&view=log
of course, the 'deprecated' part makes me wish to know if there is a more current version, but that may be obvious to me in a while...
/\/
Hi Nikolaj,
ReplyDeleteThere is a brand new mechanism to setup a developer workspace,i.e. checkout the sources and provision the target platform. I haven't found the time to document it properly, but here is a short README:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.cdo/releng/org.eclipse.emf.cdo.releng/?root=Modeling_Project
Have fun ;-)
Cheers
/Eike
Hi Eike.
ReplyDeleteThis project exists on any scm? I can't find information about how to download it.
I can't even find buckminster at new eclipse 3.7/4.1 M5 repository...
thank you very much !
Hi Cristiano,
ReplyDeleteBuckminster has left the train. I've updated our source setup instructions accordingly: http://wiki.eclipse.org/CDO_Source_Installation#Prepare_the_IDE
Cheers
/Eike
Hi Eike
ReplyDeleteI'm tryin to run the example for the first time but as I run the org.gastro.server I got the error : "Cannot locate JRE definition : jdk1.5.0_22. Launch aborted" , then I've tried to change the GastroServer.launch manually and change the jdk to my version but I got the same error , so please help me to fix it
Regards
Aryan
Hi Aryan,
ReplyDeleteI'm afraid that I can not help with this kind of "environmental" problem unless sitting in front of it. By "manually" you don't mean with a text editor, eh? I'm sure that, if you use the JDT/PDE/OSGi tools of Eclipse, you should be able to launch with your JRE.
Cheers
/Eike
This comment has been removed by the author.
ReplyDeleteHi Aryan,
ReplyDeletedid you tried the following?
Run, Run Configurations..., select your Launch, in Main tab click Installed JREs...
check the path of your JVM
Vincenzo
thx Vincenzo , ja I've tried it but now the problem is something else and I think I've checked out the wrong version of this example so can anyone tell me exactly where can I find the right version ? because I could just find it in "org.eclipse.emf.cdo.deprecated" and nowhere else , I've also tried to download cdo-gastro-example.psf and import it but it doesn't work .I'm new to this , therefor I ask this kind of basic questions !
ReplyDeleteI would be interested in reading the article and translate it in Italian. Let's try to write to the pubblisher...
ReplyDeleteMoonbiter, a nice idea!
ReplyDeleteIn case they don't have these old issues or you can't wait for them, here are the online links: http://www.eclipse.org/resources/resource.php?id=510
Buon Appetito
/Eike
" Team Project Set" plugins are not available?
ReplyDeleteUma, I don't understand your question ;-(
ReplyDeleteThis Link "Team Project Set" is empty.
ReplyDeleteAh, if you tell me where you're seeing this link I can remove it. We don't work with PSFs anymore since we've migrated to Git. I'm currently updating the CDO Source Installation page...
ReplyDeleteHi Eike,
ReplyDeleteIs there any way API of CDO can help me to generate Hibernate artifacts(HBM file) from an input of ECORE model instead of using Eclipse plugin?
We want the code generation to be programatic.
Thanks,
Appasamy
Hi Appasamy, you've already asked this question on the official support forum, the EMF newsgroup and it's been answered there.
ReplyDeleteHi Eike,
ReplyDeleteThe orders did not come through to the "bar" and "kitchen" even after i sent the orders from the tables. Blank grey screen.
Version: Juno Release
Build id: 20120620-1657
Macbook Air (64-bit)
Unknown, please ask for support on the EMF forum/newsgroup. And please describe in more detail what s "blank grey screen" is.
ReplyDeleteThink i found the issue.
ReplyDeletehttps://bugs.eclipse.org/bugs/show_bug.cgi?id=353628
I have the same problem of "Unknown".
ReplyDeleteWhen i send the orders i don't see them in bar and kitchen