Ignite Create Table

Posted on  by admin

What if you only had 5 minutes and 20 slides to wow a roomful of people? That’s the premise of an Ignite talk. Your slides auto-advance every 15 seconds. That means that you have to choose your words carefully, create slides with a lot of visual impact and be very entertaining. Think of it as an abbreviated TED talk.

According to Igniteshow.com, “Ignite is a fast-paced geek event started by Brady Forrest, Technology Evangelist for O’Reilly Media, and Bre Pettis of Makerbot.com, formerly of MAKE Magazine. Speakers are given 20 slides, each shown for 15 seconds, giving each speaker 5 minutes of fame. The first Ignite took place in Seattle in 2006, and since then the event has become an international phenomenon, with gatherings all over the world.”

  1. One Java application will read some data from a JSON file and create a DataFrame that is stored in Ignite. The JSON file is provided with the Apache Ignite distribution. The second Java application will read the DataFrame from Ignite and perform some filtering using SQL.
  2. IgniteCache cache = ignite. GetOrCreateCache (new CacheConfiguration. SetName ('Person')); // Creating City table. Query (new SqlFieldsQuery ('CREATE TABLE City (id int primary key, name varchar, region varchar)')).
  3. Start with an outline. Every presentation you create should start with an outline.

How to create table in every Apache ignite cache using JAVA SQL statement? Ignition.setClientMode (true); Set set = new HashSet ; set.add ('127.0.0.1:0'); discoveryMulticastIpFinder.setAddresses (set); TcpDiscoverySpi discoverySpi = new TcpDiscoverySpi ; discoverySpi.setIpFinder (discoveryMulticastIpFinder); cfg.setDiscoverySpi (discoverySpi); Ignite.

You don’t have to be at an Ignite event to give an Ignite talk. Anytime you want to communicate quickly and in an entertaining way is a great time for an Ignite presentation. Here’s how to develop one.

1. Start with an outline

Every presentation you create should start with an outline. Too many times people start their presentations by creating slides, which is a little like shooting a movie with no script: you might get some good visuals but your story is all over the place. Your outline should be done either on paper or with text-editing software. Anything but PowerPoint! You want to concentrate on story structure right now. The slides come later.

Your outline is the foundation of your speech. It should have a strong opening premise, much like the first paragraph in a newspaper or magazine article. You want to grab people’s attention and to tell them what you’re going to tell them. The body of the outline is your supporting information. Stories, facts, statistics…everything that lends credence to your introduction. Last comes the big finish: call to action, summation of what you’ve talked about, thoughtful question for the audience, etc.

2. Write your script

After you’ve polished your outline, it’s time to write your script. Write exactly the same way as you usually talk, but leave out unexplained jargon, highly technical terms that most people wouldn’t understand, gigantic words you seldom use, etc.. Make your tone conversational, as if you’re just speaking with a friend.

Table

When you’re happy with your script, then create a blank 20-slide PowerPoint presentation. Cut and paste your script onto the slides. Make any edits you think you need, but don’t do any layout or add any images. We’re still just dealing with words at this point.

3. Fine tune the timing

Go to Slide Show/Rehearse Timings and start reading!

Tap the space bar on your keyboard to advance after you read each slide. At the end of your presentation, you will see a prompt telling you how long your narration was and asking if you want to save the new slide timings. Click “Yes.”

On your first runthrough, you’ll notice that some slides go on for too long, others not long enough. Edit your speech by adding, deleting and rearranging text until reading each slide takes 13–14 seconds. Once you’ve gotten your timing right, print out your presentation. This will be your rehearsal and recording script.

4. Design your slides

Ignite presentations tend to contain large pictures, simple charts and graphs, and a minimal amount of text without any bullet points. Sometimes, an Ignite presentation will have only one photo per slide. Here are some examples:

Using your script as a guide, add visuals to the slides. Some slides could be all text, others could be all images. How your slides look will depend entirely on your script. An Ignite deck is not a teleprompter, so avoid the temptation to put too much information on your slides.

Don’t use animation that is activated by mouse clicks. All animation should be set to run automatically. Any animation you include should be uncomplicated because the real star of an Ignite presentation is the speaker…you!

5. Set your slide times

Click on the Transitions tab on the Ribbon. Select Fade (#1, above). In the Timing group, deselect “On Mouse Click” and select “After.” Type 15 in the box (#2, above). Then click “Apply to All (#3, above). Now you’re ready to…

6. Practice!

Ignite

Practice, practice, practice, practice, practice, practice, practice, practice, practice, practice, practice, practice, practice! Am I making myself clear?

Your delivery should be smooth, unhurried, and seem unrehearsed. This comes only with a complete familiarity with what you’re going to say.

Now, go get ’em, killer! This is one presentation your audience will remember for a long time!

Explore a tutorial using Apache Ignite thin client.

Join the DZone community and get the full member experience.

Join For Free

From the version 2.4.0, Apache Ignite introduced a new way to connect to the Ignite cluster, which allows communication with the Ignite cluster without starting an Ignite client node. Historically, Apache Ignite provides two notions of client and server nodes. Ignite client node is intended as lightweight mode, which does not store data (however, it can store near cache) and does not execute any compute tasks. Mainly, the client node is used to communicate with the server remotely and allows manipulating the Ignite Caches using the whole set of Ignite API’s. There are two main downsides with the Ignite Client node:

  • Whenever Ignite client node connects to the Ignite cluster, it becomes the part of the cluster topology. The bigger the topology is, the harder it is for maintaining.
  • In the client mode, Apache Ignite node consumes a lot of resources for performing cache operations

To solve the above problems, Apache Ignite provides a new binary client protocol for implementing thin Ignite client in any programming language or platforms.

Note that the word thin means it doesn’t start any Ignite node for communicating with the Ignite cluster and doesn’t implement any discovery/communication SPI logic.

Thin client connects to the Ignite cluster through a TCP socket and performs CRUD operations using a well-defined binary protocol. The protocol is a fully socket-based, request-response style protocol. The protocol is designed to be strict enough to ensure standardization in the communication (such as connection handshake, message length, etc.), but still flexible enough that developers may expand upon the protocol to implement custom features.

Portions of this article were taken from the book The Apache Ignite book. If it got you interested, check out the rest of the book for more helpful information. There is a special 20% discount for the DZone readers, please use the following coupon.

Apache Ignite provides brief data formats and communication details in the documentation for using the binary protocol. Ignite already supports .NET, and Java thin client builds on top of the protocol and plans to release a thin client for major languages such as goLang, python, etc. However, you can implement your thin client in any favorite programming language of your choice by using the binary protocol.

Also note that the performance of the Apache Ignite thin client is slightly lower than Ignite client node as it works through an intermediary node. Assume that, you have two nodes of the Apache Ignite A, B and you are using a thin client C for retrieving data from the cluster. With the thin client C, you have connected to the node B, and whenever you try to retrieve any data that belongs to the node A, the requests always go through the client B. In case of the Ignite client node, it sends the request directly to the node A.

Most of the times, you should not care about how the message formats look or the socket handshake performs. Thin client for every programming language encapsulates the ugly hard work under the hood for you. Anyway, if you want to have a deep dive into the Ignite binary protocol or if you have any issues to create with your own thin client, please refer to the Ignite documentation.
Before moving on to more advanced topics, let’s have a look at a simple application to use Ignite thin client. In this simple application, I show you the bits and pieces you need to get started with the thin client. The source code for the examples is available at the GitHub repository, see chapter-2.
Step 1. Clone or download the project from the GitHub repository. If you are planning to develop the project from scratch, add the following maven dependency in your pom.xml file. The only ignite-core library need for the thin client, the rest of the libraries only used for logging.

Step 2. Now, let's create a new Java class with the name HelloThinClient.

Step 3. Copy and paste the following source code. Do not forget to save the file.

Step 4. Let's have a closer look at the program we have written above.

Ignite Create Table Java

First, we have declared a few constants: logger, host IP address, port, and the cache name that we are going to create. If you have a different IP address, you should change it here. Port 10800 is the default for Ignite thin client.

These are our next exciting lines in the program. We have created an instance of the Ignite СlientConfiguration and passed the address we declared above. In the next try-catch block, we have defined a new cache with name thin-cache and put 2 key-value pairs. We also used the Ignition.start Client method to initialize a connection to Ignite node.

Later, we retrieved the value of key Vladimir and printed the value in the console.
Step 5. Start your Apache Ignite single node cluster if it is not started yet. Use the following command in your favorite terminal.

Step 6. To build the project, issue the following command.

This will run Maven, telling it to execute the install goal. This goal will compile, test, and package your project code and then copy it into the local dependency repository. The first time the build process will take a few minutes to complete, after successful compilation, an executable jar named HelloThinClient-runnable.jar will be created in the target directory.
Step 7. Run the application by typing the following command.

You should see a lot of logs in the terminal. At the end of the log, you should find something like this.

The application is connected through the TCP socket to the Ignite node and performed put and get operations on cache thin-cache. If you take a look at the Ignite node console, you should notice that Ignite cluster topology has not been changed.

Spark Create Table

apache ignite,gridgain,database,in-memory caching,in-memory computing,thin client,tutorial

Published at DZone with permission of Shamim Bhuiyan. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone