Introduction - What Is Redis?
Redis is an in-memory data store, implemented as a NoSQL database. Basically, normal databases store all of the data on-disk (meaning it gets written to a Hard Drive; with Redis, data is stored in-memory. meaning it stays in RAM so everything can be accessed quickly. Redis also takes care of a few tricks that might cause errors in other database types.
Why would you use Redis? Because it's fast. If your website or API has data that needs to be super accurate in real time, and you have a lot of users accessing that data at the same time, then Redis is good. (This is especially true if you don't have too many items in the database.) Let's look at using Redis. How To Use Redis
So how do we actually use Redis? Redis is just a database, so we can access it either through a terminal (command line), or from a programming language, just like we would with any other database. (Of course, actual entry into the database will vary a bit depending on which cloud service you're using as your database server.)
Redis Commands (Language Syntax)
To communicate with a Redis database, a programming language is required. (Sort of.) There are certain commands that are able to be performed on Redis.
First, go through this tutorial to get a general feeling for how the commands work. Then, keep this command list as a reference whenever you need to use Redis. Using Redis Locally (On Your Computer)
To set up a Redis server locally on your computer, for testing purposes, simply install redis-server on the command line.
In your terminal (on Ubuntu), use the following command to install redis-server.
sudo apt-get install redis-server
Whenever you want to simulate a redis server on your local computer,
redis-server
This will turn the terminal into a redis server. (By default, the port is 6379. Other details can be read in the terminal.)
Using Redis From The Command Line
Speaking to our redis database from the command line can be done by using the redis-cli. In your normal terminal (when using the local server setup), prefix your redis commands with "redis-cli" to speak with the redis database.
For example, the following two commands will create a variable named "srcCounter" and increment it by 1 (the default is 0), and then it'll display that number with a GET. redis-cli incr srcCounter redis-cli get srcCounter
For the official redis CLI tutorial, click here. (It'll show you the way to connect to a redis DB on a cloud server, if you're working with a real DB and not just from our local computer.)
And don't forget to review the commands to know how to interact with the redis database. Using Redis From A Programming Language
Often, we only use the command line to interact with our databases for initial setup or for testing. The most important way we use databases is by interacting with them using a programming language.
Redis has library support for many programming languages. Here's an official list of supported redis libraries. Depending on the language your program is in, choose the officially supported language and use it. Most of the time, it's a simple "connect to the redis database server, and interact with is using the usual redis commands", so it's not that hard to implement redis if you've been following along in the previous sections. Conclusion
Redis is a popular tool, and to be honest, it's a really cool and useful utility. (Their company is pretty good about supporting it, too.)
Try to use Redis if your data is needs to be accessed by a lot of users, and speed is REALLY important.
Like this content and want more? Feel free to look around and find another blog post that interests you. You can also contact me through one of the various social media channels.
Twitter: @srcmake Discord: srcmake#3644 Youtube: srcmake Twitch: www.twitch.tv/srcmake Github: srcmake
References:
1. Redis Homepage. 2. Redis commands. 3. Redis command tutorial online. 4. Install redis-server. 5. Redis-CLI document. TechDay New York 2018
You can register to attend the event here. It seems that to get onto the Main Expo Floor, the price is $10 if you register now, or $30 on the event day. The event used to be free, but to be fair, $10 is really really cheap for what you'll get out of the event. For sure I'd recommend paying the $10 to attend if you're available too. I attended NY TechDay in 2016, but I was actually behind a booth for the company I worked for. In 2017, I attended NY TechDay as a member of the regular attendee. (It looks like a lot of stuff, and it is. The companies want to advertise, so make sure to show all of your goodies to your friends and family!) Of course, it's also great for the companies in attendance, because they get to promote their brand to the press and investors. And it seems there's more than just the Expo Hall this year. TechDayTalks seems to be a series of talks from leaders in the startup industry. (Actually, I think something similar existed last year, but I wasn't allowed to see it with my General Pass. I guess the Full Conference Pass may be worth it, if you have the money to spare?) Attending TechDay New York 2018
Some NY transit for those who don't know what it's like. (I took the Long Island Railroad to Penn Station -> C train to 50th street -> 15 minute (one mile) walk to Pier 94. (It's a Pier, so it's not in the middle of the city. Trains don't get that close to it.) (People probably thought I was a tourist taking pictures LOL.) So I get there, and it's pretty empty. Companies are still setting their booths up, and the line to get in is nonexistant. (Wait 'til you see it later.) When I asked to be Press this year, it was sort of informal (since it's not like this website is the New York Times...), so my badge says "Software Developer/Press Guy" LUL. Pretty perfect, the person who approved me as press is hilarious and creative. Okay so here are two pictures for scale: from side to side, both of those wings were filled with booths for companies. (As I said, companies were still setting up.) We'll get to the companies at the booths later. Now we go to the VIP section for TechDay Talks. TechDay TalksSo on the "right" wing there's a VIP lounge/section for the TechDay Talks. No seriously, I think people were like "why is this guy taking pictures of empty chairs...?" Okay, so TechDay Talks are a series of 20 minute speeches where a presenter (from a big company) talks about a certain topic to the VIPs at TechDay. These VIPs are members of the press, investors, other people from big companies, etc. I watched the first three TechDay talks so let me share the key insights of the speakers with you. (Don't quote me word for word on these things, I'm basically telling you how I interpreted the talks as an audience member.)
He said that MasterCard was trying a system where, on the mirror inside of a fitting room, a customer could scan the clothing they're looking at and be able to see all available sizes and colors the clothing comes in. He also shared that the average person drives 48 minutes a day, and MasterCard is looking at ways to make that time meaningfully. (Before this talk, I thought they were just a credit card company...) The talk was actually pretty good. I liked it. He knew some interesting statistics.
2) Salesforce used AI to assist in giving employee feedback: there are no annual reviews in the company, and the reviews given are done in such a way that there's positive bias, since people like constructive feedback, but don't really like hearing negatives. 3) Salesforce created an AI talent agent that can find the strengths of people within the company and can find which positions are most suitable for them. (And some picks are things that humans would never guess, like data scientists being a good fit for human resources.) Overall, I found it pretty cool to hear what Salesforce is working on and how their company uses technology for things other than client-facing-applications. Honestly, they're a pretty cool company if they work on AI projects like that.
But I wasn't the target audience (they literally asked at the beginning of the talk how many people were experts at blockchain, and it wasn't really appropriate to raise my hand): it was clear that the other VIPs there were didn't know THAT much about blockchain, so maybe the demonstration was helpful to them? Anyway, after the third talk there was a networking break so that people could use the bathroom and chat with each other. And with that, I journeyed back to the exhibits section. The ExhibitsI left the VIP section and went back to the main area. Line seems kinda long, right? I waited on that line last year... I think at 10 AM the general public is let in, so by 11:45 AM when I took the pics, things were in full swing. Alright so seriously, I tried to take as many pics as I could, but it was hard to do without being weird. I walked around and talked to ~45% of the booths, but it's hard to seriously ask people about their company, and then ask them to take pictures. Pretty much every company was friendly and cool. We'll go over some companies soon, but let's talk about the best company. The Best Company At New York TechDay 2018(If you exhibited at NY TechDay, don't feel bad. Sorry. I like you too. Promise. With that said...) The best company at NY TechDay was "selfee". And by "best" I mean "I thought they were pretty cool. It was fun." The idea is that they take your picture, and then print your face on a cookie. Technology-wise, they take your picture using the app, then they plug the app into the laptop, which runs a program to send the pictures to the printers to be printed. The time to print the pictures is about 10-15 minutes. (Maybe quicker.) Business-wise, their ideal market is is to be able to offer their printing service at parties and events. (Which sounds like an excellent strategy to me.) Notable CompaniesAs I said, I spoke to at least 45% of the companies there, and I walked by and read at least 85% of the company's booths and to read what the companies were about. I just want to shout out a few companies that I thought were particularly interesting.
Vids is an iOS app that allows for the editing of video clips, but allows for the sharing of video clips between contacts. That's not something trivial to code. Respect. (As a software developer, I do care about the "Tech" in "TechDay". I haven't tried it myself, but the app looks cool.
(If I didn't mention your company...sorry. These companies talked to me a lot to explain their products to me. As the "Software Developer/Press Guy", the technology I see companies using is like...40% of what I care about. (Another 40% goes to business idea/market need, and like 20% goes to execution.)) The Swag/Goodies From NY TechDay 2018I'll be completely honest: this year I didn't get a lot of stuff. I probably skipped 20 booths that had swag, and then for like another 20 of the booths that I talked too, I wasn't offered goodies (and I didn't feel like asking for it). Alas, for the companies that did give me stuff, have some free advertising: From top left to bottom right: A...cube paper toy from raceya, a pair of socks from Tom Tom, a notebook from Spin, a notebook from Fixional, a notebook from aircall, a bottle of coconut water from Zico, a water bottle from OTC Markets, a screw driver/tape measure keychain from Unpakt, a Clif bar, a pin from Unpakt, a tin of mints from Pyramid Consulting Group, a toy soccer ball from Vids, headphones from Pyramid Consulting group, headphones from medidata, a mini rubik's cube from BlindData, a higherlighter from Rainbow Password, some pens, a cookie from selfee, a...I think they said it was a phone clip from Pyramid Consulting Group, some candy, and a USB converter/charger from Pyramid Consulting Group. (I forgot to include a laptop camera cover from Tom Tom in the picture.) I also have some flyers and stickers. I didn't get nearly as many tote bags or t shirts as I expected. ConclusionNew York TechDay 2018 was pretty cool. The companies were interesting and the event was fun. I'm gonna be honest though, the TechDay Talks were super awesome. To anyone thinking about it next year, I'm only able to speak for the first three talks, but the VIP admission might be worth the price, since the talks were kind of cool and useful. (It also seemed easy to network with people there.) Of course, the whole event (with the companies exhibiting) was enjoyable. Like this content and want more? Feel free to look around and find another blog post that interests you. You can also contact me through one of the various social media channels.
Twitter: @srcmake Discord: srcmake#3644 Youtube: srcmake Twitch: www.twitch.tv/srcmake Github: srcmake The Blockchain Tech Summit
The agenda for Blockchain Tech Summit seems to be broken up into two sections: Part 1 will be held during the morning from 8 AM to 12 PM on the main stage featuring panels and keynotes. Parts 2 and 3 will occur simultaneously from 1 PM to 6 PM: there will be panels and speakers on the main stage, but there will also be off-stage workshop meetings, Q/A sessions, and round-table discussions. More information about Blockchain Tech Summit can be found on their eventbrite page, where you can also purchase tickets to attend the event yourself. Going To Blockchain Tech Summit 2018The atmosphere of the event wasn't like any event I went to before...how do I put this...It was very small and tight knit. The room doesn't have many people, so every member of the audience matters. And when the speakers speak, it's not like they're saying a speech in front of some large audience, it's in front of a group of peers, so they're really speaking with you like at a small dinner party moreso than talking "at you" like most events/speeches. It was very cool. The event had a combination of single speakers and panel discussions. Both were pretty interesting. I won't go into detail about the speeches themselves, but the content was usually about the speaker's experience running a blockchain company, including tips for what worked and what didn't, discussions about how to handle various non-business aspects of blockchain (like media, public perception, legal stuff), talks about how to make blockchain succeed and what needed to be done in the future, and also present opinions of blockchain and where blockchain will trend in the future. The speakers themselves were all people high up on the corporate ladder for big companies involved with blockchain. And there were people from various sections, from the US government, to startups, to bigger companies, from various departments such as IT and even legal teams. Networking with the people at the event seemed VERY useful.
Like this content and want more? Feel free to look around and find another blog post that interests you. You can also contact me through one of the various social media channels.
Twitter: @srcmake Discord: srcmake#3644 Youtube: srcmake Twitch: www.twitch.tv/srcmake Github: srcmake |
AuthorHi, I'm srcmake. I play video games and develop software. Pro-tip: Click the "DIRECTORY" button in the menu to find a list of blog posts.
License: All code and instructions are provided under the MIT License.
|