Search Results

Search found 1241 results on 50 pages for 'consumer electronics'.

Page 1/50 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Going Direct to Consumer in Consumer Goods – Live Webcast April 12

    - by Michael Seback
    Going Direct to Consumer is top of mind with executives in the Consumer Goods (CG) industry today.   Join our live webcast on Thursday, April 12 to learn what CG companies worldwide are thinking as they deploy their direct-to-consumer strategies in an effort to better engage with today’s empowered consumer. Hear Jon Copestake, Chief Consumer Goods Analyst of the Economist Intelligence Unit and Oracle to discuss the findings and industry trends. Some key findings include: Pushing traditional media through new media channels is not enough to reach today’s more plugged in, product-savvy consumer CG companies are experimenting with new ways to establish and enhance direct, two-way relationships with their target consumers across multiple channels Survey respondents and other CG executives see their nascent e-commerce efforts as complimentary to, not competing with, existing retail channels. Register to attend on April 12, 8:00 a.m. PT / 11:00 p.m. ET  

    Read the article

  • Use a Crayon to Enhance Engraved Lettering on Electronics

    - by ETC
    Whether you’re making a new electronics project or trying to add definition to an old piece, you can use a simple crayon to make etched logos and text pop. At RedToRope, the DIY and project blog of electrical engineering student and tinkering James Williamson, James shares how he used a crayon and a little heat to make the lettering and symbols on his electronics project really pop. It’s an old trick I’ve used many times over the years with firearms but had never thought to use with engraved text on electronics or other devices. You rub the wax into the crevices of the etching, heat the object to melt and level the wax, and then give it a final cleanup buff. Hit up the link below to see the final results of his project as well as all the steps he went through to make the final product look so professional. Laser Engraved, Wax Filled, High Contrast Panels for Electronics Projects [RedToRope via Hacked Gadgets] Latest Features How-To Geek ETC What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions How to Enable User-Specific Wireless Networks in Windows 7 How to Use Google Chrome as Your Default PDF Reader (the Easy Way) How To Remove People and Objects From Photographs In Photoshop Make Efficient Use of Tab Bar Space by Customizing Tab Width in Firefox See the Geeky Work Done Behind the Scenes to Add Sounds to Movies [Video] Use a Crayon to Enhance Engraved Lettering on Electronics Adult Swim Brings Their Programming Lineup to iOS Devices Feel the Chill of the South Atlantic with the Antarctica Theme for Windows 7 Seas0nPass Now Offers Untethered Apple TV Jailbreaking

    Read the article

  • Introduction to Reading Electronics Schematics [Video]

    - by Jason Fitzpatrick
    If you’re interested in electronics tinkering but a bit overwhelmed by learning electronics schematics, this helpful introductory video will get you started. Courtesy of Make magazine, this video tutorial covers what a schematic is, how schematics are laid out, and the basics of reading a schematic and its component symbols. When you’re done with the video you’ll have a better grasp of electronics circuit schematics than most of the population and, hopefully, and increased comfort reading schematics for all those DIY projects we post here. Collin’s Lab: Schematics [Make via Hacked Gadgets] HTG Explains: When Do You Need to Update Your Drivers? How to Make the Kindle Fire Silk Browser *Actually* Fast! Amazon’s New Kindle Fire Tablet: the How-To Geek Review

    Read the article

  • Producer-consumer pattern with consumer restrictions

    - by Dan
    I have a processing problem that I am thinking is a classic producer-consumer problem with the two added wrinkles that there may be a variable number of producers and there is the restriction that no more than one item per producer may be consumed at any one time. I will generally have 50-100 producers and as many consumers as CPU cores on the server. I want to maximize the throughput of the consumers while ensuring that there are never more than one work item in process from any single producer. This is more complicated than the classic producer-consumer problem which I think assumes a single producer and no restriction on which work items may be in progress at any one time. I think the problem of multiple producers is relatively easily solved by enqueuing all work items on a single work queue protected by a critical section. I think the restriction on simultaneously processing work items from any single producer is harder because I cannot think of any solution that does not require each consumer to notify some kind of work dispatcher that a particular work item has been completed so as to lift the restriction on work items from that producer. In other words, if Consumer2 has just completed WorkItem42 from Producer53, there needs to be some kind of callback or notification from Consumer2 to a work dispatcher to allow the work dispatcher to release the next work item from Producer53 to the next available consumer (whether Consumer2 or otherwise). Am I overlooking something simple here? Is there a known pattern for this problem? I would appreciate any pointers.

    Read the article

  • POV Christmas Tree Is a Holiday-Themed DIY Electronics Project

    - by Jason Fitzpatrick
    If you’re looking for an electronics project with a bit of holiday cheer, this clever POV Christmas tree combines LEDs, motors, and a simple vision hack to create a glowing Christmas tree. POV (or Persistence Of Vision) hacks rely on your visual circuit’s lag time. By taking advantage of that lag POV displays can create the illusion of shapes and words where there are none. In the case of this Christmas tree hack a spinning set of LED lights creates the illusion of a Christmas tree when, in reality, there is just a few LEDs suspended in space by wire. It’s not a beginner level project by any means but it is a great way to practice surface mounting electronics and polish up your PCB making skills. Hit up the link below for the full tutorial. POV Christmas Tree [Instructables] HTG Explains: Do You Really Need to Defrag Your PC? Use Amazon’s Barcode Scanner to Easily Buy Anything from Your Phone How To Migrate Windows 7 to a Solid State Drive

    Read the article

  • Turn the Cables from Your Gaming or Electronics Setup into a Wall-Based Work of Art

    - by Asian Angel
    When it comes to gaming setups or our favorite electronics, there are always lots of cables to deal with. Now you could just bundle those cables up and try to hide them as best you can or you could turn them into a work of art… You can see additional pictures and find out how to set up your own wall-based work of art with those cables by visiting the blog post linked below. Feature Friday: Cords Away [via There I Fixed It] Here’s How to Download Windows 8 Release Preview Right Now HTG Explains: Why Linux Doesn’t Need Defragmenting How to Convert News Feeds to Ebooks with Calibre

    Read the article

  • Consumer Electronics Show (CES):CRM for High Technology Firms

    - by charles.knapp
    The Consumer Electronics Show, opening Thursday, showcases product innovations that stem from best practices in design, manufacturing, and distribution. Oracle and IBM invite you to learn best practices from peers, as well as why it matters to use CRM tailored for high technology firms -- offered only by Oracle. On Wednesday, January 5, 1-7 pm at the Bellagio Hotel Las Vegas, learn from peers at IBM, VTech, Plantronics, Cisco, Symantec, and Oracle about how to improve:Channel sales, marketing, and operations management - maximize new product introductions (NPI), sales, forecasts, training, channel promotions, and settlement Winning the deal - determine the right price for the right deal for the "perfect quote," capture the order, and manage orders Collaborative and rapid supply chain planning - improve agility, inventory turns, and profits Please join us for the Oracle/IBM CES High Technology Summit and make useful connections with your peers at the evening networking reception. Register now for this FREE event.

    Read the article

  • Consumer Electronics Show (CES) Summit:Best Practices in Transforming Channels and Partnerships

    - by charles.knapp
    Expanding consumer demand is driving the entire high technology industry, accompanied by product lifecycles as short as a few months, continued pricing and promotion pressures, and increased globalization. Unifying global channel management, operations, and execution flow will increase efficiency and growth. IT can help, but one must think beyond generic ERP and CRM. Please join Oracle and IBM at the Bellagio Hotel in Las Vegas, Wednesday January 5, 1-7 pm. Learn from IBM, VTech, Plantronics, Cisco, Symantec and Oracle High Tech Product Strategy how to improve:Channel sales, marketing, and operations management - enhance NPI, sales, forecasts, training, promotion planning, execution and settlement Winning the deal - determining the right price for the right deal for the "perfect quote", capturing the order and order management Collaborative and rapid supply chain planning - improve agility, inventory turns, and profits Register now for this FREE event. We hope you'll join us for our Oracle High Technology CES Summit and networking reception with your peers.

    Read the article

  • Glowing Chess Set Combines LEDs, Chess, and DIY Electronics Fun

    - by ETC
    Anyone who says that the centuries old game of Chess cannot be improved upon has obviously never played with a glowing chess board. Today we take a look at a cheap glass chess set modded to glow from within. Instructables user Tetranitrate had a glass chess set he scored on-the-cheap and had always wanted to illuminate it in some way. He ruled out illuminating the board itself (no good way to keep track of the piece colors) and putting a battery in each piece (too big of a pain, over complicates the design). His final solution, the one seen in the photo here, was to build a wood and copper board, run a low voltage across the surface of the chess board, and affix a conductive copper ring to the bottom of each chess piece to power the LED embedded inside. In this manner the pieces would glow on the board and then go dark as soon as they were removed from play. Hit up the link below for additional details on the build and instructions on building your own. LED Chess Set [Instructables] Latest Features How-To Geek ETC How to Get Amazing Color from Photos in Photoshop, GIMP, and Paint.NET Learn To Adjust Contrast Like a Pro in Photoshop, GIMP, and Paint.NET Have You Ever Wondered How Your Operating System Got Its Name? Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? Save Files Directly from Your Browser to the Cloud in Chrome and Iron The Steve Jobs Chronicles – Charlie and the Apple Factory [Video] Google Chrome Updates; Faster, Cleaner Menus, Encrypted Password Syncing, and More Glowing Chess Set Combines LEDs, Chess, and DIY Electronics Fun Peaceful Alpine River on a Sunny Day [Wallpaper] Fast Society Creates Mini and Mobile Temporary Social Networks

    Read the article

  • Electronics Recycling

    - by Evan Carroll
    Is it common practice to not pay for recycling electronics? I find it kind of funny that scrap metal demands such a premium but electronics recycling gets nothing. My dad owns a stereostore and throws away hundreds of radio head-units a month is there anything useful or profitable that can be done with electronics on such a mass scale? http://stselectronicrecyclinginc.com/index.php/electronics-recycling http://www.basscomputerrecycling.com/?page_id=30 http://www.computerrecyclecenter.com/services.htm None of them seem to pay anything for the scrap.

    Read the article

  • Who Do You Turn To for Your Consumer Goods Sales and Marketing Needs

    - by ruth.donohue
    As a sales or marketing executive, you want the best software for managing your marketing, demand generation, trade promotion, customer/volume planning, and retail execution/monitoring activities and analysis. However, working with niche software vendors can result in a very disjointed user and support experience. It would be ideal to have just one end-to-end solution that could manage and optimize each of these processes...but is that just wishful thinking? Read this Gartner article to find out more!

    Read the article

  • Tech Germs – Tis the Season [Infographic]

    - by Asian Angel
    Think the tech and household items you work with or use on a daily basis are clean? Then think again. View a Larger Version of the Infographic Tech Germs [infographic] – Blog Post [via Elinor Mills] How to See What Web Sites Your Computer is Secretly Connecting To HTG Explains: When Do You Need to Update Your Drivers? How to Make the Kindle Fire Silk Browser *Actually* Fast!

    Read the article

  • Getting Started in Electronics Tinkering: A Shopping List

    - by Jason Fitzpatrick
    If you’re interested getting an electronics tinkering hobby off the ground this detailed list of things you’ll need (including why you’ll need them and how to get the best value) is an excellent starting place. Kenneth Finnegan started his adventures in electronics tinkering a little over two years ago and in that time advanced from being a complete beginner to putting together some really advanced projects. After his projects started appearing on popular hacking/electronics blogs like Hack A Day he decided to put together a guide to help out all the new hobbyists who were emailing him about his projects and what kind of gear they should get. His buying guide covers books, equipment, development tools, components, and analog chips. His list is very detailed with links galore and plenty of explanation for a new hobbyist. So You Want to Build Electronics [Kenneth Finnegan via Hack A Day] What is a Histogram, and How Can I Use it to Improve My Photos?How To Easily Access Your Home Network From Anywhere With DDNSHow To Recover After Your Email Password Is Compromised

    Read the article

  • Producer and Consumer Threads Hang

    - by user972425
    So this is my first foray into threads and thus far it is driving me insane. My problem seems to be some kind of synchronization error that causes my consumer thread to hang. I've looked at other code and just about everything I could find and I can't find what my error is. There also seems to be a discrepancy between the code being executed in Eclipse and via javac in the command line. Intention - Using a bounded buffer (with 1000 slots) create and consume 1,000,000 doubles. Use only notify and wait. Problem - In Eclipse the consumer thread will occasionally hang around 940,000 iterations, but other times completes. In the command line the consumer thread always hangs. Output - Eclipse - Successful Producer has produced 100000 doubles. Consumer has consumed 100000 doubles. Producer has produced 200000 doubles. Consumer has consumed 200000 doubles. Producer has produced 300000 doubles. Consumer has consumed 300000 doubles. Producer has produced 400000 doubles. Consumer has consumed 400000 doubles. Producer has produced 500000 doubles. Consumer has consumed 500000 doubles. Producer has produced 600000 doubles. Consumer has consumed 600000 doubles. Producer has produced 700000 doubles. Consumer has consumed 700000 doubles. Producer has produced 800000 doubles. Consumer has consumed 800000 doubles. Producer has produced 900000 doubles. Consumer has consumed 900000 doubles. Producer has produced 1000000 doubles. Producer has produced all items. Consumer has consumed 1000000 doubles. Consumer has consumed all items. Exitting Output - Command Line/Eclipse - Unsuccessful Producer has produced 100000 doubles. Consumer has consumed 100000 doubles. Producer has produced 200000 doubles. Consumer has consumed 200000 doubles. Producer has produced 300000 doubles. Consumer has consumed 300000 doubles. Producer has produced 400000 doubles. Consumer has consumed 400000 doubles. Producer has produced 500000 doubles. Consumer has consumed 500000 doubles. Producer has produced 600000 doubles. Consumer has consumed 600000 doubles. Producer has produced 700000 doubles. Consumer has consumed 700000 doubles. Producer has produced 800000 doubles. Consumer has consumed 800000 doubles. Producer has produced 900000 doubles. Consumer has consumed 900000 doubles. Producer has produced 1000000 doubles. Producer has produced all items. At this point it just sits and hangs. Any help you can provide about where I might have misstepped is greatly appreciated. Code - Producer thread import java.text.DecimalFormat;+ " doubles. Cumulative value of generated items= " + temp) import java.util.*; import java.io.*; public class producer implements Runnable{ private buffer produceBuff; public producer (buffer buff){ produceBuff = buff; } public void run(){ Random random = new Random(); double temp = 0, randomElem; DecimalFormat df = new DecimalFormat("#.###"); for(int i = 1; i<=1000000; i++) { randomElem = (Double.parseDouble( df.format(random.nextDouble() * 100.0))); try { produceBuff.add(randomElem); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } temp+= randomElem; if(i%100000 == 0) {produceBuff.print("Producer has produced "+ i ); } } produceBuff.print("Producer has produced all items."); } } Consumer thread import java.util.*; import java.io.*; public class consumer implements Runnable{ private buffer consumBuff; public consumer (buffer buff){ consumBuff = buff; } public void run(){ double temp = 0; for(int i = 1; i<=1000000; i++) { try { temp += consumBuff.get(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } if(i%100000 == 0) {consumBuff.print("Consumer has consumed "+ i ); //if(i>999000) //{System.out.println("Consuming item " + i);} } consumBuff.print("Consumer has consumed all items."); } } Buffer/Main import java.util.*; import java.io.*; public class buffer { private double buff[]; private int addPlace; private int getPlace; public buffer(){ buff = new double[1000]; addPlace = 0; getPlace = 0; } public synchronized void add(double add) throws InterruptedException{ if((addPlace+1 == getPlace) ) { try { wait(); } catch (InterruptedException e) {throw e;} } buff[addPlace] = add; addPlace = (addPlace+1)%1000; notify(); } public synchronized double get()throws InterruptedException{ if(getPlace == addPlace) { try { wait(); } catch (InterruptedException e) {throw e;} } double temp = buff[getPlace]; getPlace = (getPlace+1)%1000; notify(); return temp; } public synchronized void print(String view) { System.out.println(view); } public static void main(String args[]){ buffer buf = new buffer(); Thread produce = new Thread(new producer(buf)); Thread consume = new Thread(new consumer(buf)); produce.start(); consume.start(); try { produce.join(); consume.join(); } catch (InterruptedException e) {return;} System.out.println("Exitting"); } }

    Read the article

  • Learning Electronics & the Arduino Microcontroller

    - by Chris Williams
    Lately, I've had a growing interest in Electronics & Microcontrollers. I'm a loyal reader of Make Magazine and thoroughly enjoy seeing all the various projects in each issue, even though I rarely try to make any of them. I've been reading and watching videos about the Arduino, which is an open source Microcontroller and software project that the people at Make (and a lot of other folks) are pretty hot about. Even the prebuilt hardware is remarkably inexpensive , although there are kits available to build one from the base components. (Full disclosure: I bought my first soldering iron... EVER... just last week, so I fully acknowledge the likelihood of making some mistakes. That's why I'm not trying to do the "build it yourself" kit just yet. It's also another reason to be happy the hardware is so cheap.) There are a number of different Arduino boards available, but the two that have really piqued my interest are the Arduino UNO and the NETduino. The UNO is a very popular board, with a number of features and is under $35 which means I won't hurl myself off a bridge when I inevitably destroy it. The NETduino is very similar to the Arduino UNO and has the added advantage of being programmable with... you guessed it... C#. I'm actually ordering both boards and some miscellaneous other doodads to go with them.  There are a few good websites for this sort of thing, including www.makershed.com and www.adafruit.com. The price difference is negligible, so in my case, I'm ordering from Maker Shed (the Make Magazine people) because I want to support them. :) I've also picked up a few O'Reilly books on the subject which I am looking forward to reading & reviewing: Make: Electronics, Arduino: A Quick Start Guide and Getting Started With Arduino (all three of which arrived on my doorstep today.) This ties in with my "learn more about robotics" goals as well, since I'll need a good understanding of Electronics if I want to move past Lego Mindstorms eventually.

    Read the article

  • Producer/consumer in Grails?

    - by Mulone
    Hi all, I'm trying to implement a Consumer/Producer app in Grails, after several unsuccessful attempts at implementing concurrent threads. Basically I want to store all the events coming from a clients (through separate AJAX calls) in a single queue and then process such a queue in a linear way as soon as new events are added. This looks like a Producer/Consumer problem: http://en.wikipedia.org/wiki/Producer-consumer_problem How can I implement this in Grails (maybe with a timer or even better by generating an event 'process queue')? Basically I'd like to a have a singleton service waiting for new events in the queue and processing them linearly (even if the queue is loaded by several concurrent processes). Any hints? Cheers!

    Read the article

  • [C++] Producer/Consumer Implementation -- Feedback Wanted

    - by bobber205
    I'm preparing for an interview in a few weeks and I thougth I would give threads in boost a go, as well as do the simple producer/consumer problem I learned in school. Haven't done it quite awhile so I was curious what you guys think of this? What should I add to make it a better example etc. Thanks for the feedback! :) ////////////////////////////////////////////////////////////////////////// boost::mutex bufferMutex; deque<int> buffer; const int maxBufferSize = 5; ////////////////////////////////////////////////////////////////////////// bool AddToBuffer(int i) { if (buffer.size() < maxBufferSize) { buffer.push_back(i); return true; } else { return false; } } bool GetFromBuffer(int& toReturn) { if (buffer.size() == 0) { return false; } else { toReturn = buffer[buffer.size()-1]; buffer.pop_back(); return true; } } struct Producer { int ID; void operator()() { while (true) { boost::mutex::scoped_lock lock(bufferMutex); int num = dice(); bool result = AddToBuffer(num); lock.unlock(); //safe area done if (result) { cout << "Producer " << this->ID << " Added " << num << endl; } else { cout << "!!Buffer was Full!!" << endl; } //Added //Now wait boost::xtime xt; xtime_get( &xt, boost::TIME_UTC); xt.nsec += 1000000 + 100000 * (rand() % 1000); boost::thread::sleep(xt); } } }; struct Consumer { int ID; void operator()() { while (true) { int returnedInt = 0; boost::mutex::scoped_lock lock(bufferMutex); bool result = GetFromBuffer(returnedInt); lock.unlock(); //safe area done if (result) { cout << "\tConsumer " << this->ID << " Took Out " << returnedInt << endl; } else { cout << "!!Buffer was Empty!!" << endl; } //Added //Now wait boost::xtime xt; xtime_get( &xt, boost::TIME_UTC); xt.nsec += 1000000 + 100000 * (rand() % 1000); boost::thread::sleep(xt); } } }; void main() { Producer p, p2; Consumer c, c2; p.ID = 1; p2.ID = 2; c.ID = 1; c2.ID = 2; boost::thread thread1(boost::ref(p)); boost::thread thread2(boost::ref(c)); boost::thread thread3(boost::ref(p2)); boost::thread thread4(boost::ref(c2)); int x; cin >> x; }

    Read the article

  • The Best of CES (Consumer Electronics Show) in 2011

    - by Justin Garrison
    This year, How-To Geek’s own Justin was on-site at the Consumer Electronics Show in Las Vegas, where every gadget manufacturer shows off their latest creations, and he was able to sit down and get hands-on with most of them. Here’s the best of the bunch. Make sure to also check out our list of the Worst of CES 2011, where we covered the gadgets that just didn’t make the cut Latest Features How-To Geek ETC HTG Projects: How to Create Your Own Custom Papercraft Toy How to Combine Rescue Disks to Create the Ultimate Windows Repair Disk What is Camera Raw, and Why Would a Professional Prefer it to JPG? The How-To Geek Guide to Audio Editing: The Basics How To Boot 10 Different Live CDs From 1 USB Flash Drive The 20 Best How-To Geek Linux Articles of 2010 Arctic Theme for Windows 7 Gives Your Desktop an Icy Touch Install LibreOffice via PPA and Receive Auto-Updates in Ubuntu Creative Portraits Peek Inside the Guts of Modern Electronics Scenic Winter Lane Wallpaper to Create a Relaxing Mood Access Your Web Apps Directly Using the Context Menu in Chrome The Deep – Awesome Use of Metal Objects as Deep Sea Creatures [Video]

    Read the article

  • MS in Computer Science after BE in electronics

    - by Abhinav
    I am doing my 3rd year Bachelors in Electronics and Electrical Communication but from the first year I have been interested in Computer Science. But at that time it was just my hobby. But in second year when I joined robotics my love for computer science rose. I with my team came in top three in 2 National Competition (Technical fests of different IITs) where we used Image Processing, Hardware interfacing etc. But then I realised that Computer Science is not just about coding. I took many lectures from online free schools like Udacity, Coursera in subjects related to Artificial Intelligence, Building a Search Engine, Design and Analysis of Algorithm, Programming a Robotic Car, Programming Languages, Machine Learning, Software Engineering as a Service, WebApps Engineering, Compilers, Applied Crypotography etc. I also did some courses in Core and Advanced Java in my second year from training institute. I will also be taking course in Statistics, Databases, Discrete Mathematics from 25th June. Now I realized how vast is the field of Computer Science and how efficient you become on deciding algorithms and classifying problems into different subfields which have been thoroughly researched so you don't always do brute force thing or naive programming. Now this field has become kind of passion for me. Adding to the fact I am also doing my 6 months internship in software field in Texas Instruments where I am working on Automation and Algorithms. I also have some 5-6 good college level projects in Softwares and Robotics. I also like Electronics but only some fields like Operating System(this subject was there in Electronics also), Micro Processor, Digital, Computer Architecture, DSPs etc. I really want to pursue MS in some field of Computer Science. I am giving GRE in October/November. Till now I have good CG of around 9.4/10 and my 1 year in college is still left. Do I have any chance that some good University in US will consider me for MS in field related to computer science or Robotics. Also Can you suggest somethings that I can do during this 1 year to increase my chances for MS or should I apply for EECS(Electrical Engineering and Computer Science) and then I can shift more towards Computer Science as my major option. My main aim is to do Phd after Ms in CS if I am able to do that somehow. I know that I have to put much extra effort to understand things in MS than CS undergraduates but I will do that with my full dedication, also when I communicate with my college CS students or during my internship period I didn't feel that I am missing very much stuff that they know and was very comfortable during my internship with software employees.

    Read the article

  • Integration Patterns with Azure Service Bus Relay, Part 2: Anonymous full-trust .NET consumer

    - by Elton Stoneman
    This is the second in the IPASBR series, see also: Integration Patterns with Azure Service Bus Relay, Part 1: Exposing the on-premise service Part 2 is nice and easy. From Part 1 we exposed our service over the Azure Service Bus Relay using the netTcpRelayBinding and verified we could set up our network to listen for relayed messages. Assuming we want to consume that service in .NET from an environment which is fairly unrestricted for us, but quite restricted for attackers, we can use netTcpRelay and shared secret authentication. Pattern applicability This is a good fit for scenarios where: the consumer can run .NET in full trust the environment does not restrict use of external DLLs the runtime environment is secure enough to keep shared secrets the service does not need to know who is consuming it the service does not need to know who the end-user is So for example, the consumer is an ASP.NET website sitting in a cloud VM or Azure worker role, where we can keep the shared secret in web.config and we don't need to flow any identity through to the on-premise service. The service doesn't care who the consumer or end-user is - say it's a reference data service that provides a list of vehicle manufacturers. Provided you can authenticate with ACS and have access to Service Bus endpoint, you can use the service and it doesn't care who you are. In this post, we’ll consume the service from Part 1 in ASP.NET using netTcpRelay. The code for Part 2 (+ Part 1) is on GitHub here: IPASBR Part 2 Authenticating and authorizing with ACS In this scenario the consumer is a server in a controlled environment, so we can use a shared secret to authenticate with ACS, assuming that there is governance around the environment and the codebase which will prevent the identity being compromised. From the provider's side, we will create a dedicated service identity for this consumer, so we can lock down their permissions. The provider controls the identity, so the consumer's rights can be revoked. We'll add a new service identity for the namespace in ACS , just as we did for the serviceProvider identity in Part 1. I've named the identity fullTrustConsumer. We then need to add a rule to map the incoming identity claim to an outgoing authorization claim that allows the identity to send messages to Service Bus (see Part 1 for a walkthrough creating Service Idenitities): Issuer: Access Control Service Input claim type: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier Input claim value: fullTrustConsumer Output claim type: net.windows.servicebus.action Output claim value: Send This sets up a service identity which can send messages into Service Bus, but cannot register itself as a listener, or manage the namespace. Adding a Service Reference The Part 2 sample client code is ready to go, but if you want to replicate the steps, you’re going to add a WSDL reference, add a reference to Microsoft.ServiceBus and sort out the ServiceModel config. In Part 1 we exposed metadata for our service, so we can browse to the WSDL locally at: http://localhost/Sixeyed.Ipasbr.Services/FormatService.svc?wsdl If you add a Service Reference to that in a new project you'll get a confused config section with a customBinding, and a set of unrecognized policy assertions in the namespace http://schemas.microsoft.com/netservices/2009/05/servicebus/connect. If you NuGet the ASB package (“windowsazure.servicebus”) first and add the service reference - you'll get the same messy config. Either way, the WSDL should have downloaded and you should have the proxy code generated. You can delete the customBinding entries and copy your config from the service's web.config (this is already done in the sample project in Sixeyed.Ipasbr.NetTcpClient), specifying details for the client:     <client>       <endpoint address="sb://sixeyed-ipasbr.servicebus.windows.net/net"                 behaviorConfiguration="SharedSecret"                 binding="netTcpRelayBinding"                 contract="FormatService.IFormatService" />     </client>     <behaviors>       <endpointBehaviors>         <behavior name="SharedSecret">           <transportClientEndpointBehavior credentialType="SharedSecret">             <clientCredentials>               <sharedSecret issuerName="fullTrustConsumer"                             issuerSecret="E3feJSMuyGGXksJi2g2bRY5/Bpd2ll5Eb+1FgQrXIqo="/>             </clientCredentials>           </transportClientEndpointBehavior>         </behavior>       </endpointBehaviors>     </behaviors>   The proxy is straight WCF territory, and the same client can run against Azure Service Bus through any relay binding, or directly to the local network service using any WCF binding - the contract is exactly the same. The code is simple, standard WCF stuff: using (var client = new FormatService.FormatServiceClient()) { outputString = client.ReverseString(inputString); } Running the sample First, update Solution Items\AzureConnectionDetails.xml with your service bus namespace, and your service identity credentials for the netTcpClient and the provider:   <!-- ACS credentials for the full trust consumer (Part2): -->   <netTcpClient identityName="fullTrustConsumer"                 symmetricKey="E3feJSMuyGGXksJi2g2bRY5/Bpd2ll5Eb+1FgQrXIqo="/> Then rebuild the solution and verify the unit tests work. If they’re green, your service is listening through Azure. Check out the client by navigating to http://localhost:53835/Sixeyed.Ipasbr.NetTcpClient. Enter a string and hit Go! - your string will be reversed by your on-premise service, routed through Azure: Using shared secret client credentials in this way means ACS is the identity provider for your service, and the claim which allows Send access to Service Bus is consumed by Service Bus. None of the authentication details make it through to your service, so your service is not aware who the consumer is (MSDN calls this "anonymous authentication").

    Read the article

  • Integration Patterns with Azure Service Bus Relay, Part 3: Anonymous partial-trust consumer

    - by Elton Stoneman
    This is the third in the IPASBR series, see also: Integration Patterns with Azure Service Bus Relay, Part 1: Exposing the on-premise service Integration Patterns with Azure Service Bus Relay, Part 2: Anonymous full-trust .NET consumer As the patterns get further from the simple .NET full-trust consumer, all that changes is the communication protocol and the authentication mechanism. In Part 3 the scenario is that we still have a secure .NET environment consuming our service, so we can store shared keys securely, but the runtime environment is locked down so we can't use Microsoft.ServiceBus to get the nice WCF relay bindings. To support this we will expose a RESTful endpoint through the Azure Service Bus, and require the consumer to send a security token with each HTTP service request. Pattern applicability This is a good fit for scenarios where: the runtime environment is secure enough to keep shared secrets the consumer can execute custom code, including building HTTP requests with custom headers the consumer cannot use the Azure SDK assemblies the service may need to know who is consuming it the service does not need to know who the end-user is Note there isn't actually a .NET requirement here. By exposing the service in a REST endpoint, anything that can talk HTTP can be a consumer. We'll authenticate through ACS which also gives us REST endpoints, so the service is still accessed securely. Our real-world example would be a hosted cloud app, where we we have enough room in the app's customisation to keep the shared secret somewhere safe and to hook in some HTTP calls. We will be flowing an identity through to the on-premise service now, but it will be the service identity given to the consuming app - the end user's identity isn't flown through yet. In this post, we’ll consume the service from Part 1 in ASP.NET using the WebHttpRelayBinding. The code for Part 3 (+ Part 1) is on GitHub here: IPASBR Part 3. Authenticating and authorizing with ACS We'll follow the previous examples and add a new service identity for the namespace in ACS, so we can separate permissions for different consumers (see walkthrough in Part 1). I've named the identity partialTrustConsumer. We’ll be authenticating against ACS with an explicit HTTP call, so we need a password credential rather than a symmetric key – for a nice secure option, generate a symmetric key, copy to the clipboard, then change type to password and paste in the key: We then need to do the same as in Part 2 , add a rule to map the incoming identity claim to an outgoing authorization claim that allows the identity to send messages to Service Bus: Issuer: Access Control Service Input claim type: http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier Input claim value: partialTrustConsumer Output claim type: net.windows.servicebus.action Output claim value: Send As with Part 2, this sets up a service identity which can send messages into Service Bus, but cannot register itself as a listener, or manage the namespace. RESTfully exposing the on-premise service through Azure Service Bus Relay The part 3 sample code is ready to go, just put your Azure details into Solution Items\AzureConnectionDetails.xml and “Run Custom Tool” on the .tt files.  But to do it yourself is very simple. We already have a WebGet attribute in the service for locally making REST calls, so we are just going to add a new endpoint which uses the WebHttpRelayBinding to relay that service through Azure. It's as easy as adding this endpoint to Web.config for the service:         <endpoint address="https://sixeyed-ipasbr.servicebus.windows.net/rest"                   binding="webHttpRelayBinding"                    contract="Sixeyed.Ipasbr.Services.IFormatService"                   behaviorConfiguration="SharedSecret">         </endpoint> - and adding the webHttp attribute in your endpoint behavior:           <behavior name="SharedSecret">             <webHttp/>             <transportClientEndpointBehavior credentialType="SharedSecret">               <clientCredentials>                 <sharedSecret issuerName="serviceProvider"                               issuerSecret="gl0xaVmlebKKJUAnpripKhr8YnLf9Neaf6LR53N8uGs="/>               </clientCredentials>             </transportClientEndpointBehavior>           </behavior> Where's my WSDL? The metadata story for REST is a bit less automated. In our local webHttp endpoint we've enabled WCF's built-in help, so if you navigate to: http://localhost/Sixeyed.Ipasbr.Services/FormatService.svc/rest/help - you'll see the uri format for making a GET request to the service. The format is the same over Azure, so this is where you'll be connecting: https://[your-namespace].servicebus.windows.net/rest/reverse?string=abc123 Build the service with the new endpoint, open that in a browser and you'll get an XML version of an HTTP status code - a 401 with an error message stating that you haven’t provided an authorization header: <?xml version="1.0"?><Error><Code>401</Code><Detail>MissingToken: The request contains no authorization header..TrackingId:4cb53408-646b-4163-87b9-bc2b20cdfb75_5,TimeStamp:10/3/2012 8:34:07 PM</Detail></Error> By default, the setup of your Service Bus endpoint as a relying party in ACS expects a Simple Web Token to be presented with each service request, and in the browser we're not passing one, so we can't access the service. Note that this request doesn't get anywhere near your on-premise service, Service Bus only relays requests once they've got the necessary approval from ACS. Why didn't the consumer need to get ACS authorization in Part 2? It did, but it was all done behind the scenes in the NetTcpRelayBinding. By specifying our Shared Secret credentials in the consumer, the service call is preceded by a check on ACS to see that the identity provided is a) valid, and b) allowed access to our Service Bus endpoint. By making manual HTTP requests, we need to take care of that ACS check ourselves now. We do that with a simple WebClient call to the ACS endpoint of our service; passing the shared secret credentials, we will get back an SWT: var values = new System.Collections.Specialized.NameValueCollection(); values.Add("wrap_name", "partialTrustConsumer"); //service identity name values.Add("wrap_password", "suCei7AzdXY9toVH+S47C4TVyXO/UUFzu0zZiSCp64Y="); //service identity password values.Add("wrap_scope", "http://sixeyed-ipasbr.servicebus.windows.net/"); //this is the realm of the RP in ACS var acsClient = new WebClient(); var responseBytes = acsClient.UploadValues("https://sixeyed-ipasbr-sb.accesscontrol.windows.net/WRAPv0.9/", "POST", values); rawToken = System.Text.Encoding.UTF8.GetString(responseBytes); With a little manipulation, we then attach the SWT to subsequent REST calls in the authorization header; the token contains the Send claim returned from ACS, so we will be authorized to send messages into Service Bus. Running the sample Navigate to http://localhost:2028/Sixeyed.Ipasbr.WebHttpClient/Default.cshtml, enter a string and hit Go! - your string will be reversed by your on-premise service, routed through Azure: Using shared secret client credentials in this way means ACS is the identity provider for your service, and the claim which allows Send access to Service Bus is consumed by Service Bus. None of the authentication details make it through to your service, so your service is not aware who the consumer is (MSDN calls this "anonymous authentication").

    Read the article

  • Implementing the procducer-consumer with .NET 4.0 new

    - by bitbonk
    With alle the new paralell programming features in .NET 4.0, what would be a a simple and fast way to implement the producer-consumer pattern (where at least one thread is producing and enqueuing task items and one other thread executes (dequeues) these tasks). Can we benfit from all these new APIs? What is your preferred implementation of this pattern?

    Read the article

  • Implementing the procducer-consumer pattern with .NET 4.0

    - by bitbonk
    With alle the new paralell programming features in .NET 4.0, what would be a a simple and fast way to implement the producer-consumer pattern (where at least one thread is producing/enqueuing task items and another thread executes/dequeues these tasks). Can we benfit from all these new APIs? What is your preferred implementation of this pattern?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >